/*
 * Spectrum-lib
 * Copyright (C) 2011 Benjamin Mort
 *
 * This library is free software; you can redistribute it and/or modify it
 * under terms of the Spectrum-lib Licence, Version 1.0
 */

#ifndef XY_PLOT_H_
#define XY_PLOT_H_

/**
 * @file XYPlot.h
 */

#include "spectrum_global.h"

#include <qwt_plot_curve.h>
#include <qwt_symbol.h>
#include <QtCore/QVector>

namespace spectrum {

class SPECTRUM_EXPORT XYPlot : public QwtPlotCurve
{
    public:
        enum Style { DOT, LINE_DOT, LINE };

    public:
        XYPlot();

        virtual ~XYPlot();

        virtual void setData(const unsigned n, const double* y);

        virtual void setPlotStyle(const Style style = DOT);

    private:
        QVector<double> _x;
        QVector<double> _y;
};

} // namespace spectrum
#endif // XY_PLOT_H_
